/**
 * @file HandlerBase.cpp
 * @author Derek Liu (yjkhtddx@sina.com)
 * @brief 处理器基类
 * @version 0.0.1
 * @date 2020-07-17
 * 
 * @coryright Copyright Sci-Tech Laboratories (c) 2020
 * 
 */

#pragma once
#include <osipparser2/osip_message.h>

class HandlerBase
{
public:
    HandlerBase() = default;
    virtual ~HandlerBase() = default;

protected:
    int sendSimplyResp(const char* uname, struct eXosip_t* excontext, int tid, int status);

    int sendCallAck(struct eXosip_t *excontext, int did);

    int getStatcodeFromResp(osip_message_t* resp);

    const char* getMsgIdFromReq(osip_message_t* req);
};